using System;
using System.Linq;
using System.Threading.Tasks;
using My.ExcelToData.EntityFrameworkCore;
using Volo.Abp.Domain.Repositories.EntityFrameworkCore;
using Volo.Abp.EntityFrameworkCore;

namespace My.ExcelToData.ExcelDatas;

public class ExcelDataRepository : EfCoreRepository<ExcelToDataDbContext, ExcelData, Guid>, IExcelDataRepository
{
    public ExcelDataRepository(IDbContextProvider<ExcelToDataDbContext> dbContextProvider) : base(dbContextProvider)
    {
    }

    public override async Task<IQueryable<ExcelData>> WithDetailsAsync()
    {
        return (await GetQueryableAsync()).IncludeDetails();
    }
}